pack_file object
The pack_file object is used to package several files into one.
pack_file()
Parameters:
None.
Remarks:
A pack file is generally useful if you have a lot of files that you wish to distribute as one file on disk. This most commonly applies to sounds, but can include other data such as game level layouts etc.
When a pack_file object is first created, it will not be active. To activate it you must call either the "create" or the "open" method on the object, specifying a file that should be associated with it. You may call these methods again at any time if you wish to associate another pack with the object, at which point the old association (if any) will be cleared. This, in short, allows you to reuse the same pack_file object for manipulating more than one pack.
Please note that storing files inside a pack in no way enhances security. If you wish to protect your files from being tampered with or read by others, use the encryption functions on them before adding them to the pack.
Example:
// Create a pack file and add some test files.
void main()
{
pack_file test;
test.create("pack.dat");
test.add_file("test1.txt","t1");
test.add_file("test2.txt","t2");
test.add_file("test3.txt","t3");
test.close();
}